package com.sbr.seb.entity.tbd;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
@Table(name = "projet", catalog = "tbd", uniqueConstraints = @UniqueConstraint(columnNames = "nom_projet"))
public class Projet implements Serializable {

	private Integer id;
	private String nomProjet;
	private String description;

	public Projet() {
	}

	public Projet(String nomProjet) {
		this.nomProjet = nomProjet;
	}

	public Projet(String nomProjet, String descriptionProjet) {
		this.nomProjet = nomProjet;
		this.description= descriptionProjet;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_projet", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer idProjet) {
		this.id = idProjet;
	}

	@Column(name = "nom_projet", unique = true, nullable = false, length = 50)
	public String getNomProjet() {
		return this.nomProjet;
	}

	public void setNomProjet(String nomProjet) {
		this.nomProjet = nomProjet;
	}

	@Column(name = "description_projet")
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String descriptionProjet) {
		this.description = descriptionProjet;
	}

}
